#include<stdio.h>
int main()
{
    //freopen("in.txt","r",stdin);
    int a,b;
    while (scanf("%d %d",&a,&b) != EOF && !(a == 0 && b == 0))
    {
        if (a <= b)
        {
            printf("%d %d\n",a,b);
        }
        else printf("%d %d\n",b,a);
    }
    
}